package com.edu.exam.enums.curriculum.questionbank;

/**
 * 标准指标类型枚举
 * 
 * 质量评估的标准指标类型定义
 * 
 * @author System
 * @version 1.0.0
 */
public enum StandardMetricType {
    CONTENT_QUALITY("CONTENT_QUALITY", "内容质量"),
    OPTION_INTERFERENCE("OPTION_INTERFERENCE", "选项干扰性"),
    DIFFICULTY_ACCURACY("DIFFICULTY_ACCURACY", "难度准确性"),
    SCORING_FAIRNESS("SCORING_FAIRNESS", "评分公平性"),
    EXPLANATION_CLARITY("EXPLANATION_CLARITY", "解析清晰度"),
    KNOWLEDGE_COVERAGE("KNOWLEDGE_COVERAGE", "知识点覆盖度"),
    LANGUAGE_ACCURACY("LANGUAGE_ACCURACY", "语言准确性"),
    EDUCATIONAL_VALUE("EDUCATIONAL_VALUE", "教育价值");

    private final String code;
    private final String description;

    StandardMetricType(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static StandardMetricType fromCode(String code) {
        for (StandardMetricType type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return CONTENT_QUALITY;
    }
}